package com.wowo.other;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

public class App {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("other/app.xml");
//        Boy boy = applicationContext.getBean(Boy.class);
//        System.out.println(boy);
//        boy.getGirl().kiss();
        BeanCollectionDemo beanCollectionDemo = applicationContext.getBean(BeanCollectionDemo.class);
        List<String> strings = beanCollectionDemo.getStrings();
        System.out.println(strings);
        Map<String,String> maps = beanCollectionDemo.getMaps();
        for(Map.Entry<String,String> entry:maps.entrySet()){
            String mapKey = entry.getKey();
            String mapValue = entry.getValue();
            System.out.println(mapKey+" , "+mapValue);
        }
        Properties ps = beanCollectionDemo.getPs();
        Set<Object> keys =  ps.keySet();
        for(Object key:keys){
//            System.out.println(key+" , "+keys.get(key));
        }

    }
}
